﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <title>softphoneBar</title>
    <link href="/Public/css/pages.css" rel="stylesheet" type="text/css"/>
    <script src="/Public/js/jquery.min.js?v=2.1.4"></script>
    <script src="/Public/js/layer/layer.js"></script>
    <script src="/Public/js/layui/layui.js"></script>
    <script type="text/javascript" src="/Public/js/icallcenter/global.js"></script>
    <script type="text/javascript" src="/Public/js/icallcenter/callProcessor.js"></script>
    <script type="text/javascript" src="/Public/hojo/hojo.js" djConfig="isDebug:false, parseOnLoad:false"></script>

    <style type="text/css">
        .barBox {
            float: left;
            display: flex;
        }
        #softphonebar {
            width: 70%;
            height: 10%;
            float: left;
        }
    </style>
    <script type="text/javascript">
        hojo.registerModulePath("icallcenter", "../js/icallcenter");
        hojo.require("icallcenter.logon");
        hojo.require("hojo.io.script");
        hojo.addOnLoad(function () {
            var loginName = "<{$agent}>";
            var password = "<{$agentPwd}>";
//            var loginName = "8001@hyyjr";
//            var password = "8001";
            var extenType = "gateway";//Local
            icallcenter.logon.startLogon(loginName, password, extenType);
        });
        hojo.addOnWindowUnload(function () {
            if (phone) {

            }
        })

        //转接
        function transfer_to(agent) {
            phone.transfer(agent, 'external');
        }

        //坐席状态设置
        function set_Busy(is_busy, status) {
            phone.setBusy(is_busy, status);
        }

        //拨打电话
        function call_out(is_busy, status) {
            phone.setBusy(is_busy, status);
        }

        //登出
        function log_out() {
            icallcenter.logon.logout();
        }

    </script>
</head>

<body>
<div id="softphonebar" style="position: relative;">
    <div class="barBox" id="callStatus">

        <input type="text" id="icallcenter.dialout.input" value="输入手机号码" onfocus="if(value=='输入手机号码') {value=''}"
               onblur="if(value==''){value='输入手机号码'}"
               onKeyDown="if(event.keyCode == 13){softphoneBar.dialout(hojo.byId('icallcenter.dialout.input').value)}"
               class="inp1 fl"/>

        <a href="#" class="DialEnable" id="DialEnable" style="float: left"
           onclick="softphoneBar.dialout(hojo.byId('icallcenter.dialout.input').value)"></a>
        <a href="#" class="DialDisable" id="DialDisable" style="display: none"></a>
        <a href="#" class="HangupEnable" id="HangupEnable" style="display: none"
           onClick="javascript:phone.hangup();"></a>
        <a href="#" class="HangupDisable" id="HangupDisable"></a>
        <a href="#" class="TransferEnable" id="TransferEnable" style="display: none"
           onClick="javascript:softphoneBar.toTransfer();"></a>
        <a href="#" class="TransferDisable" id="TransferDisable"></a>
    </div>
    <!--<div class="barBox" id="peerStatus">-->
    <!--<div class="clear10">&nbsp;</div>-->
    <!--<div class="fl" style="width:5px;">&nbsp;</div>-->
    <!--<a href="#" id="IdleEnable" class="IdleEnable"></a>-->
    <!--<a href="#" onclick="javascript:phone.setBusy(false,'0')" id="IdleDisable" class="IdleDisable"-->
    <!--style="display: none"></a>-->
    <!--<a href="#" id="RestEnable" class="RestEnable" style="display: none"></a>-->
    <!--<a href="#" onclick="javascript:phone.setBusy(true,'2')" id="RestDisable" class="RestDisable"></a>-->
    <!--<a href="#" id="BusyEnable" class="BusyEnable" style="display: none"></a>-->
    <!--<a href="#" onclick="javascript:phone.setBusy(true,'1')" id="BusyDisable" class="BusyDisable"></a>-->
    <!--</div>-->
    <div id="memo_info_div"></div>

</div>
<div id="netMessage"></div>
<iframe id="icallcenter.iframe" style="display: none"></iframe>

</body>
</html>